<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - lcov.info.p - core/contracts/protocol/pool/src/core/contracts/protocol/pool/Pool.sol</title>
  <link rel="stylesheet" type="text/css" href="../../../../../../../../../gcov.css">
</head>

<body>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="title">LCOV - code coverage report</td></tr>
            <tr><td class="ruler"><img src="../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>

            <tr>
              <td width="100%">
                <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="10%" class="headerValue"><a href="../../../../../../../../../index.html">top level</a> - <a href="index.html">core/contracts/protocol/pool/src/core/contracts/protocol/pool</a> - Pool.sol<span style="font-size: 80%;"> (source / <a href="Pool.sol.func-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="5%"></td>
            <td width="5%" class="headerCovTableHead">Coverage</td>
            <td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td>
            <td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">lcov.info.p</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntryHi">99.1&nbsp;%</td>
            <td class="headerCovTableEntry">108</td>
            <td class="headerCovTableEntry">107</td>
          </tr>
          <tr>
            <td class="headerItem">Test Date:</td>
            <td class="headerValue">2024-04-09 14:12:28</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntryHi">98.4&nbsp;%</td>
            <td class="headerCovTableEntry">61</td>
            <td class="headerCovTableEntry">60</td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="headerItem">Branches:</td>
            <td class="headerCovTableEntryHi">-</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">0</td>
          </tr>
                  <tr><td><img src="../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
                </table>
              </td>
            </tr>

            <tr><td class="ruler"><img src="../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
          </table>

          <table cellpadding=0 cellspacing=0 border=0>
            <tr>
              <td><br></td>
            </tr>
            <tr>
              <td>
<pre class="sourceHeading">             Branch data     Line data    Source code</pre>
<pre class="source">
<span id="L1"><span class="lineNum">       1</span>                 :             : // SPDX-License-Identifier: BUSL-1.1</span>
<span id="L2"><span class="lineNum">       2</span>                 :             : pragma solidity ^0.8.10;</span>
<span id="L3"><span class="lineNum">       3</span>                 :             : </span>
<span id="L4"><span class="lineNum">       4</span>                 :             : import {VersionedInitializable} from '../libraries/aave-upgradeability/VersionedInitializable.sol';</span>
<span id="L5"><span class="lineNum">       5</span>                 :             : import {Errors} from '../libraries/helpers/Errors.sol';</span>
<span id="L6"><span class="lineNum">       6</span>                 :             : import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';</span>
<span id="L7"><span class="lineNum">       7</span>                 :             : import {PoolLogic} from '../libraries/logic/PoolLogic.sol';</span>
<span id="L8"><span class="lineNum">       8</span>                 :             : import {ReserveLogic} from '../libraries/logic/ReserveLogic.sol';</span>
<span id="L9"><span class="lineNum">       9</span>                 :             : import {EModeLogic} from '../libraries/logic/EModeLogic.sol';</span>
<span id="L10"><span class="lineNum">      10</span>                 :             : import {SupplyLogic} from '../libraries/logic/SupplyLogic.sol';</span>
<span id="L11"><span class="lineNum">      11</span>                 :             : import {FlashLoanLogic} from '../libraries/logic/FlashLoanLogic.sol';</span>
<span id="L12"><span class="lineNum">      12</span>                 :             : import {BorrowLogic} from '../libraries/logic/BorrowLogic.sol';</span>
<span id="L13"><span class="lineNum">      13</span>                 :             : import {LiquidationLogic} from '../libraries/logic/LiquidationLogic.sol';</span>
<span id="L14"><span class="lineNum">      14</span>                 :             : import {DataTypes} from '../libraries/types/DataTypes.sol';</span>
<span id="L15"><span class="lineNum">      15</span>                 :             : import {BridgeLogic} from '../libraries/logic/BridgeLogic.sol';</span>
<span id="L16"><span class="lineNum">      16</span>                 :             : import {IERC20WithPermit} from '../../interfaces/IERC20WithPermit.sol';</span>
<span id="L17"><span class="lineNum">      17</span>                 :             : import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';</span>
<span id="L18"><span class="lineNum">      18</span>                 :             : import {IPool} from '../../interfaces/IPool.sol';</span>
<span id="L19"><span class="lineNum">      19</span>                 :             : import {IACLManager} from '../../interfaces/IACLManager.sol';</span>
<span id="L20"><span class="lineNum">      20</span>                 :             : import {PoolStorage} from './PoolStorage.sol';</span>
<span id="L21"><span class="lineNum">      21</span>                 :             : </span>
<span id="L22"><span class="lineNum">      22</span>                 :             : /**</span>
<span id="L23"><span class="lineNum">      23</span>                 :             :  * @title Pool contract</span>
<span id="L24"><span class="lineNum">      24</span>                 :             :  * @author Aave</span>
<span id="L25"><span class="lineNum">      25</span>                 :             :  * @notice Main point of interaction with an Aave protocol's market</span>
<span id="L26"><span class="lineNum">      26</span>                 :             :  * - Users can:</span>
<span id="L27"><span class="lineNum">      27</span>                 :             :  *   # Supply</span>
<span id="L28"><span class="lineNum">      28</span>                 :             :  *   # Withdraw</span>
<span id="L29"><span class="lineNum">      29</span>                 :             :  *   # Borrow</span>
<span id="L30"><span class="lineNum">      30</span>                 :             :  *   # Repay</span>
<span id="L31"><span class="lineNum">      31</span>                 :             :  *   # Swap their loans between variable and stable rate</span>
<span id="L32"><span class="lineNum">      32</span>                 :             :  *   # Enable/disable their supplied assets as collateral rebalance stable rate borrow positions</span>
<span id="L33"><span class="lineNum">      33</span>                 :             :  *   # Liquidate positions</span>
<span id="L34"><span class="lineNum">      34</span>                 :             :  *   # Execute Flash Loans</span>
<span id="L35"><span class="lineNum">      35</span>                 :             :  * @dev To be covered by a proxy contract, owned by the PoolAddressesProvider of the specific market</span>
<span id="L36"><span class="lineNum">      36</span>                 :             :  * @dev All admin functions are callable by the PoolConfigurator contract defined also in the</span>
<span id="L37"><span class="lineNum">      37</span>                 :             :  *   PoolAddressesProvider</span>
<span id="L38"><span class="lineNum">      38</span>                 :             :  */</span>
<span id="L39"><span class="lineNum">      39</span>                 :             : abstract contract Pool is VersionedInitializable, PoolStorage, IPool {</span>
<span id="L40"><span class="lineNum">      40</span>                 :             :   using ReserveLogic for DataTypes.ReserveData;</span>
<span id="L41"><span class="lineNum">      41</span>                 :             : </span>
<span id="L42"><span class="lineNum">      42</span>                 :             :   IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;</span>
<span id="L43"><span class="lineNum">      43</span>                 :             : </span>
<span id="L44"><span class="lineNum">      44</span>                 :             :   /**</span>
<span id="L45"><span class="lineNum">      45</span>                 :             :    * @dev Only pool configurator can call functions marked by this modifier.</span>
<span id="L46"><span class="lineNum">      46</span>                 :             :    */</span>
<span id="L47"><span class="lineNum">      47</span>                 :             :   modifier onlyPoolConfigurator() {</span>
<span id="L48"><span class="lineNum">      48</span>                 :             :     _onlyPoolConfigurator();</span>
<span id="L49"><span class="lineNum">      49</span>                 :             :     _;</span>
<span id="L50"><span class="lineNum">      50</span>                 :             :   }</span>
<span id="L51"><span class="lineNum">      51</span>                 :             : </span>
<span id="L52"><span class="lineNum">      52</span>                 :             :   /**</span>
<span id="L53"><span class="lineNum">      53</span>                 :             :    * @dev Only pool admin can call functions marked by this modifier.</span>
<span id="L54"><span class="lineNum">      54</span>                 :             :    */</span>
<span id="L55"><span class="lineNum">      55</span>                 :             :   modifier onlyPoolAdmin() {</span>
<span id="L56"><span class="lineNum">      56</span>                 :             :     _onlyPoolAdmin();</span>
<span id="L57"><span class="lineNum">      57</span>                 :             :     _;</span>
<span id="L58"><span class="lineNum">      58</span>                 :             :   }</span>
<span id="L59"><span class="lineNum">      59</span>                 :             : </span>
<span id="L60"><span class="lineNum">      60</span>                 :             :   /**</span>
<span id="L61"><span class="lineNum">      61</span>                 :             :    * @dev Only bridge can call functions marked by this modifier.</span>
<span id="L62"><span class="lineNum">      62</span>                 :             :    */</span>
<span id="L63"><span class="lineNum">      63</span>                 :             :   modifier onlyBridge() {</span>
<span id="L64"><span class="lineNum">      64</span>                 :             :     _onlyBridge();</span>
<span id="L65"><span class="lineNum">      65</span>                 :             :     _;</span>
<span id="L66"><span class="lineNum">      66</span>                 :             :   }</span>
<span id="L67"><span class="lineNum">      67</span>                 :             : </span>
<span id="L68"><span class="lineNum">      68</span>                 :<span class="tlaGNC tlaBgGNC">       80486 :   function _onlyPoolConfigurator() internal view virtual {</span></span>
<span id="L69"><span class="lineNum">      69</span>                 :<span class="tlaGNC">      160972 :     require(</span></span>
<span id="L70"><span class="lineNum">      70</span>                 :             :       ADDRESSES_PROVIDER.getPoolConfigurator() == msg.sender,</span>
<span id="L71"><span class="lineNum">      71</span>                 :             :       Errors.CALLER_NOT_POOL_CONFIGURATOR</span>
<span id="L72"><span class="lineNum">      72</span>                 :             :     );</span>
<span id="L73"><span class="lineNum">      73</span>                 :             :   }</span>
<span id="L74"><span class="lineNum">      74</span>                 :             : </span>
<span id="L75"><span class="lineNum">      75</span>                 :<span class="tlaGNC">        2000 :   function _onlyPoolAdmin() internal view virtual {</span></span>
<span id="L76"><span class="lineNum">      76</span>                 :<span class="tlaGNC">        4000 :     require(</span></span>
<span id="L77"><span class="lineNum">      77</span>                 :             :       IACLManager(ADDRESSES_PROVIDER.getACLManager()).isPoolAdmin(msg.sender),</span>
<span id="L78"><span class="lineNum">      78</span>                 :             :       Errors.CALLER_NOT_POOL_ADMIN</span>
<span id="L79"><span class="lineNum">      79</span>                 :             :     );</span>
<span id="L80"><span class="lineNum">      80</span>                 :             :   }</span>
<span id="L81"><span class="lineNum">      81</span>                 :             : </span>
<span id="L82"><span class="lineNum">      82</span>                 :<span class="tlaGNC">          26 :   function _onlyBridge() internal view virtual {</span></span>
<span id="L83"><span class="lineNum">      83</span>                 :<span class="tlaGNC">          52 :     require(</span></span>
<span id="L84"><span class="lineNum">      84</span>                 :             :       IACLManager(ADDRESSES_PROVIDER.getACLManager()).isBridge(msg.sender),</span>
<span id="L85"><span class="lineNum">      85</span>                 :             :       Errors.CALLER_NOT_BRIDGE</span>
<span id="L86"><span class="lineNum">      86</span>                 :             :     );</span>
<span id="L87"><span class="lineNum">      87</span>                 :             :   }</span>
<span id="L88"><span class="lineNum">      88</span>                 :             : </span>
<span id="L89"><span class="lineNum">      89</span>                 :             :   /**</span>
<span id="L90"><span class="lineNum">      90</span>                 :             :    * @dev Constructor.</span>
<span id="L91"><span class="lineNum">      91</span>                 :             :    * @param provider The address of the PoolAddressesProvider contract</span>
<span id="L92"><span class="lineNum">      92</span>                 :             :    */</span>
<span id="L93"><span class="lineNum">      93</span>                 :             :   constructor(IPoolAddressesProvider provider) {</span>
<span id="L94"><span class="lineNum">      94</span>                 :             :     ADDRESSES_PROVIDER = provider;</span>
<span id="L95"><span class="lineNum">      95</span>                 :             :   }</span>
<span id="L96"><span class="lineNum">      96</span>                 :             : </span>
<span id="L97"><span class="lineNum">      97</span>                 :             :   /**</span>
<span id="L98"><span class="lineNum">      98</span>                 :             :    * @notice Initializes the Pool.</span>
<span id="L99"><span class="lineNum">      99</span>                 :             :    * @dev Function is invoked by the proxy contract when the Pool contract is added to the</span>
<span id="L100"><span class="lineNum">     100</span>                 :             :    * PoolAddressesProvider of the market.</span>
<span id="L101"><span class="lineNum">     101</span>                 :             :    * @dev Caching the address of the PoolAddressesProvider in order to reduce gas consumption on subsequent operations</span>
<span id="L102"><span class="lineNum">     102</span>                 :             :    * @param provider The address of the PoolAddressesProvider</span>
<span id="L103"><span class="lineNum">     103</span>                 :             :    */</span>
<span id="L104"><span class="lineNum">     104</span>                 :             :   function initialize(IPoolAddressesProvider provider) external virtual;</span>
<span id="L105"><span class="lineNum">     105</span>                 :             : </span>
<span id="L106"><span class="lineNum">     106</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L107"><span class="lineNum">     107</span>                 :<span class="tlaGNC">          17 :   function mintUnbacked(</span></span>
<span id="L108"><span class="lineNum">     108</span>                 :             :     address asset,</span>
<span id="L109"><span class="lineNum">     109</span>                 :             :     uint256 amount,</span>
<span id="L110"><span class="lineNum">     110</span>                 :             :     address onBehalfOf,</span>
<span id="L111"><span class="lineNum">     111</span>                 :             :     uint16 referralCode</span>
<span id="L112"><span class="lineNum">     112</span>                 :             :   ) external virtual override onlyBridge {</span>
<span id="L113"><span class="lineNum">     113</span>                 :<span class="tlaGNC">          32 :     BridgeLogic.executeMintUnbacked(</span></span>
<span id="L114"><span class="lineNum">     114</span>                 :             :       _reserves,</span>
<span id="L115"><span class="lineNum">     115</span>                 :             :       _reservesList,</span>
<span id="L116"><span class="lineNum">     116</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L117"><span class="lineNum">     117</span>                 :             :       asset,</span>
<span id="L118"><span class="lineNum">     118</span>                 :             :       amount,</span>
<span id="L119"><span class="lineNum">     119</span>                 :             :       onBehalfOf,</span>
<span id="L120"><span class="lineNum">     120</span>                 :             :       referralCode</span>
<span id="L121"><span class="lineNum">     121</span>                 :             :     );</span>
<span id="L122"><span class="lineNum">     122</span>                 :             :   }</span>
<span id="L123"><span class="lineNum">     123</span>                 :             : </span>
<span id="L124"><span class="lineNum">     124</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L125"><span class="lineNum">     125</span>                 :<span class="tlaGNC">           9 :   function backUnbacked(</span></span>
<span id="L126"><span class="lineNum">     126</span>                 :             :     address asset,</span>
<span id="L127"><span class="lineNum">     127</span>                 :             :     uint256 amount,</span>
<span id="L128"><span class="lineNum">     128</span>                 :             :     uint256 fee</span>
<span id="L129"><span class="lineNum">     129</span>                 :             :   ) external virtual override onlyBridge returns (uint256) {</span>
<span id="L130"><span class="lineNum">     130</span>                 :<span class="tlaGNC">          18 :     return</span></span>
<span id="L131"><span class="lineNum">     131</span>                 :<span class="tlaGNC">          18 :       BridgeLogic.executeBackUnbacked(_reserves[asset], asset, amount, fee, _bridgeProtocolFee);</span></span>
<span id="L132"><span class="lineNum">     132</span>                 :             :   }</span>
<span id="L133"><span class="lineNum">     133</span>                 :             : </span>
<span id="L134"><span class="lineNum">     134</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L135"><span class="lineNum">     135</span>                 :<span class="tlaGNC">        9558 :   function supply(</span></span>
<span id="L136"><span class="lineNum">     136</span>                 :             :     address asset,</span>
<span id="L137"><span class="lineNum">     137</span>                 :             :     uint256 amount,</span>
<span id="L138"><span class="lineNum">     138</span>                 :             :     address onBehalfOf,</span>
<span id="L139"><span class="lineNum">     139</span>                 :             :     uint16 referralCode</span>
<span id="L140"><span class="lineNum">     140</span>                 :             :   ) public virtual override {</span>
<span id="L141"><span class="lineNum">     141</span>                 :<span class="tlaGNC">       19130 :     SupplyLogic.executeSupply(</span></span>
<span id="L142"><span class="lineNum">     142</span>                 :             :       _reserves,</span>
<span id="L143"><span class="lineNum">     143</span>                 :             :       _reservesList,</span>
<span id="L144"><span class="lineNum">     144</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L145"><span class="lineNum">     145</span>                 :             :       DataTypes.ExecuteSupplyParams({</span>
<span id="L146"><span class="lineNum">     146</span>                 :             :         asset: asset,</span>
<span id="L147"><span class="lineNum">     147</span>                 :             :         amount: amount,</span>
<span id="L148"><span class="lineNum">     148</span>                 :             :         onBehalfOf: onBehalfOf,</span>
<span id="L149"><span class="lineNum">     149</span>                 :             :         referralCode: referralCode</span>
<span id="L150"><span class="lineNum">     150</span>                 :             :       })</span>
<span id="L151"><span class="lineNum">     151</span>                 :             :     );</span>
<span id="L152"><span class="lineNum">     152</span>                 :             :   }</span>
<span id="L153"><span class="lineNum">     153</span>                 :             : </span>
<span id="L154"><span class="lineNum">     154</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L155"><span class="lineNum">     155</span>                 :<span class="tlaGNC">        3000 :   function supplyWithPermit(</span></span>
<span id="L156"><span class="lineNum">     156</span>                 :             :     address asset,</span>
<span id="L157"><span class="lineNum">     157</span>                 :             :     uint256 amount,</span>
<span id="L158"><span class="lineNum">     158</span>                 :             :     address onBehalfOf,</span>
<span id="L159"><span class="lineNum">     159</span>                 :             :     uint16 referralCode,</span>
<span id="L160"><span class="lineNum">     160</span>                 :             :     uint256 deadline,</span>
<span id="L161"><span class="lineNum">     161</span>                 :             :     uint8 permitV,</span>
<span id="L162"><span class="lineNum">     162</span>                 :             :     bytes32 permitR,</span>
<span id="L163"><span class="lineNum">     163</span>                 :             :     bytes32 permitS</span>
<span id="L164"><span class="lineNum">     164</span>                 :             :   ) public virtual override {</span>
<span id="L165"><span class="lineNum">     165</span>                 :             :     try</span>
<span id="L166"><span class="lineNum">     166</span>                 :<span class="tlaGNC">        8000 :       IERC20WithPermit(asset).permit(</span></span>
<span id="L167"><span class="lineNum">     167</span>                 :             :         msg.sender,</span>
<span id="L168"><span class="lineNum">     168</span>                 :             :         address(this),</span>
<span id="L169"><span class="lineNum">     169</span>                 :             :         amount,</span>
<span id="L170"><span class="lineNum">     170</span>                 :             :         deadline,</span>
<span id="L171"><span class="lineNum">     171</span>                 :             :         permitV,</span>
<span id="L172"><span class="lineNum">     172</span>                 :             :         permitR,</span>
<span id="L173"><span class="lineNum">     173</span>                 :             :         permitS</span>
<span id="L174"><span class="lineNum">     174</span>                 :             :       )</span>
<span id="L175"><span class="lineNum">     175</span>                 :             :     {} catch {}</span>
<span id="L176"><span class="lineNum">     176</span>                 :<span class="tlaGNC">        8000 :     SupplyLogic.executeSupply(</span></span>
<span id="L177"><span class="lineNum">     177</span>                 :             :       _reserves,</span>
<span id="L178"><span class="lineNum">     178</span>                 :             :       _reservesList,</span>
<span id="L179"><span class="lineNum">     179</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L180"><span class="lineNum">     180</span>                 :             :       DataTypes.ExecuteSupplyParams({</span>
<span id="L181"><span class="lineNum">     181</span>                 :             :         asset: asset,</span>
<span id="L182"><span class="lineNum">     182</span>                 :             :         amount: amount,</span>
<span id="L183"><span class="lineNum">     183</span>                 :             :         onBehalfOf: onBehalfOf,</span>
<span id="L184"><span class="lineNum">     184</span>                 :             :         referralCode: referralCode</span>
<span id="L185"><span class="lineNum">     185</span>                 :             :       })</span>
<span id="L186"><span class="lineNum">     186</span>                 :             :     );</span>
<span id="L187"><span class="lineNum">     187</span>                 :             :   }</span>
<span id="L188"><span class="lineNum">     188</span>                 :             : </span>
<span id="L189"><span class="lineNum">     189</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L190"><span class="lineNum">     190</span>                 :<span class="tlaGNC">          43 :   function withdraw(</span></span>
<span id="L191"><span class="lineNum">     191</span>                 :             :     address asset,</span>
<span id="L192"><span class="lineNum">     192</span>                 :             :     uint256 amount,</span>
<span id="L193"><span class="lineNum">     193</span>                 :             :     address to</span>
<span id="L194"><span class="lineNum">     194</span>                 :             :   ) public virtual override returns (uint256) {</span>
<span id="L195"><span class="lineNum">     195</span>                 :<span class="tlaGNC">          90 :     return</span></span>
<span id="L196"><span class="lineNum">     196</span>                 :<span class="tlaGNC">          90 :       SupplyLogic.executeWithdraw(</span></span>
<span id="L197"><span class="lineNum">     197</span>                 :             :         _reserves,</span>
<span id="L198"><span class="lineNum">     198</span>                 :             :         _reservesList,</span>
<span id="L199"><span class="lineNum">     199</span>                 :             :         _eModeCategories,</span>
<span id="L200"><span class="lineNum">     200</span>                 :             :         _usersConfig[msg.sender],</span>
<span id="L201"><span class="lineNum">     201</span>                 :             :         DataTypes.ExecuteWithdrawParams({</span>
<span id="L202"><span class="lineNum">     202</span>                 :             :           asset: asset,</span>
<span id="L203"><span class="lineNum">     203</span>                 :             :           amount: amount,</span>
<span id="L204"><span class="lineNum">     204</span>                 :             :           to: to,</span>
<span id="L205"><span class="lineNum">     205</span>                 :             :           reservesCount: _reservesCount,</span>
<span id="L206"><span class="lineNum">     206</span>                 :             :           oracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L207"><span class="lineNum">     207</span>                 :             :           userEModeCategory: _usersEModeCategory[msg.sender]</span>
<span id="L208"><span class="lineNum">     208</span>                 :             :         })</span>
<span id="L209"><span class="lineNum">     209</span>                 :             :       );</span>
<span id="L210"><span class="lineNum">     210</span>                 :             :   }</span>
<span id="L211"><span class="lineNum">     211</span>                 :             : </span>
<span id="L212"><span class="lineNum">     212</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L213"><span class="lineNum">     213</span>                 :<span class="tlaGNC">        9113 :   function borrow(</span></span>
<span id="L214"><span class="lineNum">     214</span>                 :             :     address asset,</span>
<span id="L215"><span class="lineNum">     215</span>                 :             :     uint256 amount,</span>
<span id="L216"><span class="lineNum">     216</span>                 :             :     uint256 interestRateMode,</span>
<span id="L217"><span class="lineNum">     217</span>                 :             :     uint16 referralCode,</span>
<span id="L218"><span class="lineNum">     218</span>                 :             :     address onBehalfOf</span>
<span id="L219"><span class="lineNum">     219</span>                 :             :   ) public virtual override {</span>
<span id="L220"><span class="lineNum">     220</span>                 :<span class="tlaGNC">       18232 :     BorrowLogic.executeBorrow(</span></span>
<span id="L221"><span class="lineNum">     221</span>                 :             :       _reserves,</span>
<span id="L222"><span class="lineNum">     222</span>                 :             :       _reservesList,</span>
<span id="L223"><span class="lineNum">     223</span>                 :             :       _eModeCategories,</span>
<span id="L224"><span class="lineNum">     224</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L225"><span class="lineNum">     225</span>                 :             :       DataTypes.ExecuteBorrowParams({</span>
<span id="L226"><span class="lineNum">     226</span>                 :             :         asset: asset,</span>
<span id="L227"><span class="lineNum">     227</span>                 :             :         user: msg.sender,</span>
<span id="L228"><span class="lineNum">     228</span>                 :             :         onBehalfOf: onBehalfOf,</span>
<span id="L229"><span class="lineNum">     229</span>                 :             :         amount: amount,</span>
<span id="L230"><span class="lineNum">     230</span>                 :             :         interestRateMode: DataTypes.InterestRateMode(interestRateMode),</span>
<span id="L231"><span class="lineNum">     231</span>                 :             :         referralCode: referralCode,</span>
<span id="L232"><span class="lineNum">     232</span>                 :             :         releaseUnderlying: true,</span>
<span id="L233"><span class="lineNum">     233</span>                 :             :         maxStableRateBorrowSizePercent: _maxStableRateBorrowSizePercent,</span>
<span id="L234"><span class="lineNum">     234</span>                 :             :         reservesCount: _reservesCount,</span>
<span id="L235"><span class="lineNum">     235</span>                 :             :         oracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L236"><span class="lineNum">     236</span>                 :             :         userEModeCategory: _usersEModeCategory[onBehalfOf],</span>
<span id="L237"><span class="lineNum">     237</span>                 :             :         priceOracleSentinel: ADDRESSES_PROVIDER.getPriceOracleSentinel()</span>
<span id="L238"><span class="lineNum">     238</span>                 :             :       })</span>
<span id="L239"><span class="lineNum">     239</span>                 :             :     );</span>
<span id="L240"><span class="lineNum">     240</span>                 :             :   }</span>
<span id="L241"><span class="lineNum">     241</span>                 :             : </span>
<span id="L242"><span class="lineNum">     242</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L243"><span class="lineNum">     243</span>                 :<span class="tlaGNC">          22 :   function repay(</span></span>
<span id="L244"><span class="lineNum">     244</span>                 :             :     address asset,</span>
<span id="L245"><span class="lineNum">     245</span>                 :             :     uint256 amount,</span>
<span id="L246"><span class="lineNum">     246</span>                 :             :     uint256 interestRateMode,</span>
<span id="L247"><span class="lineNum">     247</span>                 :             :     address onBehalfOf</span>
<span id="L248"><span class="lineNum">     248</span>                 :             :   ) public virtual override returns (uint256) {</span>
<span id="L249"><span class="lineNum">     249</span>                 :<span class="tlaGNC">          46 :     return</span></span>
<span id="L250"><span class="lineNum">     250</span>                 :<span class="tlaGNC">          46 :       BorrowLogic.executeRepay(</span></span>
<span id="L251"><span class="lineNum">     251</span>                 :             :         _reserves,</span>
<span id="L252"><span class="lineNum">     252</span>                 :             :         _reservesList,</span>
<span id="L253"><span class="lineNum">     253</span>                 :             :         _usersConfig[onBehalfOf],</span>
<span id="L254"><span class="lineNum">     254</span>                 :             :         DataTypes.ExecuteRepayParams({</span>
<span id="L255"><span class="lineNum">     255</span>                 :             :           asset: asset,</span>
<span id="L256"><span class="lineNum">     256</span>                 :             :           amount: amount,</span>
<span id="L257"><span class="lineNum">     257</span>                 :             :           interestRateMode: DataTypes.InterestRateMode(interestRateMode),</span>
<span id="L258"><span class="lineNum">     258</span>                 :             :           onBehalfOf: onBehalfOf,</span>
<span id="L259"><span class="lineNum">     259</span>                 :             :           useATokens: false</span>
<span id="L260"><span class="lineNum">     260</span>                 :             :         })</span>
<span id="L261"><span class="lineNum">     261</span>                 :             :       );</span>
<span id="L262"><span class="lineNum">     262</span>                 :             :   }</span>
<span id="L263"><span class="lineNum">     263</span>                 :             : </span>
<span id="L264"><span class="lineNum">     264</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L265"><span class="lineNum">     265</span>                 :<span class="tlaGNC">        3000 :   function repayWithPermit(</span></span>
<span id="L266"><span class="lineNum">     266</span>                 :             :     address asset,</span>
<span id="L267"><span class="lineNum">     267</span>                 :             :     uint256 amount,</span>
<span id="L268"><span class="lineNum">     268</span>                 :             :     uint256 interestRateMode,</span>
<span id="L269"><span class="lineNum">     269</span>                 :             :     address onBehalfOf,</span>
<span id="L270"><span class="lineNum">     270</span>                 :             :     uint256 deadline,</span>
<span id="L271"><span class="lineNum">     271</span>                 :             :     uint8 permitV,</span>
<span id="L272"><span class="lineNum">     272</span>                 :             :     bytes32 permitR,</span>
<span id="L273"><span class="lineNum">     273</span>                 :             :     bytes32 permitS</span>
<span id="L274"><span class="lineNum">     274</span>                 :             :   ) public virtual override returns (uint256) {</span>
<span id="L275"><span class="lineNum">     275</span>                 :             :     try</span>
<span id="L276"><span class="lineNum">     276</span>                 :<span class="tlaGNC">        8000 :       IERC20WithPermit(asset).permit(</span></span>
<span id="L277"><span class="lineNum">     277</span>                 :             :         msg.sender,</span>
<span id="L278"><span class="lineNum">     278</span>                 :             :         address(this),</span>
<span id="L279"><span class="lineNum">     279</span>                 :             :         amount,</span>
<span id="L280"><span class="lineNum">     280</span>                 :             :         deadline,</span>
<span id="L281"><span class="lineNum">     281</span>                 :             :         permitV,</span>
<span id="L282"><span class="lineNum">     282</span>                 :             :         permitR,</span>
<span id="L283"><span class="lineNum">     283</span>                 :             :         permitS</span>
<span id="L284"><span class="lineNum">     284</span>                 :             :       )</span>
<span id="L285"><span class="lineNum">     285</span>                 :             :     {} catch {}</span>
<span id="L286"><span class="lineNum">     286</span>                 :             : </span>
<span id="L287"><span class="lineNum">     287</span>                 :             :     {</span>
<span id="L288"><span class="lineNum">     288</span>                 :<span class="tlaGNC">       12000 :       DataTypes.ExecuteRepayParams memory params = DataTypes.ExecuteRepayParams({</span></span>
<span id="L289"><span class="lineNum">     289</span>                 :             :         asset: asset,</span>
<span id="L290"><span class="lineNum">     290</span>                 :             :         amount: amount,</span>
<span id="L291"><span class="lineNum">     291</span>                 :             :         interestRateMode: DataTypes.InterestRateMode(interestRateMode),</span>
<span id="L292"><span class="lineNum">     292</span>                 :             :         onBehalfOf: onBehalfOf,</span>
<span id="L293"><span class="lineNum">     293</span>                 :             :         useATokens: false</span>
<span id="L294"><span class="lineNum">     294</span>                 :             :       });</span>
<span id="L295"><span class="lineNum">     295</span>                 :<span class="tlaGNC">       12000 :       return BorrowLogic.executeRepay(_reserves, _reservesList, _usersConfig[onBehalfOf], params);</span></span>
<span id="L296"><span class="lineNum">     296</span>                 :             :     }</span>
<span id="L297"><span class="lineNum">     297</span>                 :             :   }</span>
<span id="L298"><span class="lineNum">     298</span>                 :             : </span>
<span id="L299"><span class="lineNum">     299</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L300"><span class="lineNum">     300</span>                 :<span class="tlaGNC">        1005 :   function repayWithATokens(</span></span>
<span id="L301"><span class="lineNum">     301</span>                 :             :     address asset,</span>
<span id="L302"><span class="lineNum">     302</span>                 :             :     uint256 amount,</span>
<span id="L303"><span class="lineNum">     303</span>                 :             :     uint256 interestRateMode</span>
<span id="L304"><span class="lineNum">     304</span>                 :             :   ) public virtual override returns (uint256) {</span>
<span id="L305"><span class="lineNum">     305</span>                 :<span class="tlaGNC">        2012 :     return</span></span>
<span id="L306"><span class="lineNum">     306</span>                 :<span class="tlaGNC">        2012 :       BorrowLogic.executeRepay(</span></span>
<span id="L307"><span class="lineNum">     307</span>                 :             :         _reserves,</span>
<span id="L308"><span class="lineNum">     308</span>                 :             :         _reservesList,</span>
<span id="L309"><span class="lineNum">     309</span>                 :             :         _usersConfig[msg.sender],</span>
<span id="L310"><span class="lineNum">     310</span>                 :             :         DataTypes.ExecuteRepayParams({</span>
<span id="L311"><span class="lineNum">     311</span>                 :             :           asset: asset,</span>
<span id="L312"><span class="lineNum">     312</span>                 :             :           amount: amount,</span>
<span id="L313"><span class="lineNum">     313</span>                 :             :           interestRateMode: DataTypes.InterestRateMode(interestRateMode),</span>
<span id="L314"><span class="lineNum">     314</span>                 :             :           onBehalfOf: msg.sender,</span>
<span id="L315"><span class="lineNum">     315</span>                 :             :           useATokens: true</span>
<span id="L316"><span class="lineNum">     316</span>                 :             :         })</span>
<span id="L317"><span class="lineNum">     317</span>                 :             :       );</span>
<span id="L318"><span class="lineNum">     318</span>                 :             :   }</span>
<span id="L319"><span class="lineNum">     319</span>                 :             : </span>
<span id="L320"><span class="lineNum">     320</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L321"><span class="lineNum">     321</span>                 :<span class="tlaGNC">           7 :   function swapBorrowRateMode(address asset, uint256 interestRateMode) public virtual override {</span></span>
<span id="L322"><span class="lineNum">     322</span>                 :<span class="tlaGNC">          16 :     BorrowLogic.executeSwapBorrowRateMode(</span></span>
<span id="L323"><span class="lineNum">     323</span>                 :             :       _reserves[asset],</span>
<span id="L324"><span class="lineNum">     324</span>                 :             :       _usersConfig[msg.sender],</span>
<span id="L325"><span class="lineNum">     325</span>                 :             :       asset,</span>
<span id="L326"><span class="lineNum">     326</span>                 :             :       msg.sender,</span>
<span id="L327"><span class="lineNum">     327</span>                 :             :       DataTypes.InterestRateMode(interestRateMode)</span>
<span id="L328"><span class="lineNum">     328</span>                 :             :     );</span>
<span id="L329"><span class="lineNum">     329</span>                 :             :   }</span>
<span id="L330"><span class="lineNum">     330</span>                 :             : </span>
<span id="L331"><span class="lineNum">     331</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L332"><span class="lineNum">     332</span>                 :<span class="tlaUNC tlaBgUNC">           0 :   function swapToVariable(address asset, address user) public virtual override {</span></span>
<span id="L333"><span class="lineNum">     333</span>                 :<span class="tlaUNC">           0 :     BorrowLogic.executeSwapBorrowRateMode(</span></span>
<span id="L334"><span class="lineNum">     334</span>                 :             :       _reserves[asset],</span>
<span id="L335"><span class="lineNum">     335</span>                 :             :       _usersConfig[user],</span>
<span id="L336"><span class="lineNum">     336</span>                 :             :       asset,</span>
<span id="L337"><span class="lineNum">     337</span>                 :             :       user,</span>
<span id="L338"><span class="lineNum">     338</span>                 :             :       DataTypes.InterestRateMode.STABLE</span>
<span id="L339"><span class="lineNum">     339</span>                 :             :     );</span>
<span id="L340"><span class="lineNum">     340</span>                 :             :   }</span>
<span id="L341"><span class="lineNum">     341</span>                 :             : </span>
<span id="L342"><span class="lineNum">     342</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L343"><span class="lineNum">     343</span>                 :<span class="tlaGNC tlaBgGNC">           4 :   function rebalanceStableBorrowRate(address asset, address user) public virtual override {</span></span>
<span id="L344"><span class="lineNum">     344</span>                 :<span class="tlaGNC">          10 :     BorrowLogic.executeRebalanceStableBorrowRate(_reserves[asset], asset, user);</span></span>
<span id="L345"><span class="lineNum">     345</span>                 :             :   }</span>
<span id="L346"><span class="lineNum">     346</span>                 :             : </span>
<span id="L347"><span class="lineNum">     347</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L348"><span class="lineNum">     348</span>                 :<span class="tlaGNC">          42 :   function setUserUseReserveAsCollateral(</span></span>
<span id="L349"><span class="lineNum">     349</span>                 :             :     address asset,</span>
<span id="L350"><span class="lineNum">     350</span>                 :             :     bool useAsCollateral</span>
<span id="L351"><span class="lineNum">     351</span>                 :             :   ) public virtual override {</span>
<span id="L352"><span class="lineNum">     352</span>                 :<span class="tlaGNC">          86 :     SupplyLogic.executeUseReserveAsCollateral(</span></span>
<span id="L353"><span class="lineNum">     353</span>                 :             :       _reserves,</span>
<span id="L354"><span class="lineNum">     354</span>                 :             :       _reservesList,</span>
<span id="L355"><span class="lineNum">     355</span>                 :             :       _eModeCategories,</span>
<span id="L356"><span class="lineNum">     356</span>                 :             :       _usersConfig[msg.sender],</span>
<span id="L357"><span class="lineNum">     357</span>                 :             :       asset,</span>
<span id="L358"><span class="lineNum">     358</span>                 :             :       useAsCollateral,</span>
<span id="L359"><span class="lineNum">     359</span>                 :             :       _reservesCount,</span>
<span id="L360"><span class="lineNum">     360</span>                 :             :       ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L361"><span class="lineNum">     361</span>                 :             :       _usersEModeCategory[msg.sender]</span>
<span id="L362"><span class="lineNum">     362</span>                 :             :     );</span>
<span id="L363"><span class="lineNum">     363</span>                 :             :   }</span>
<span id="L364"><span class="lineNum">     364</span>                 :             : </span>
<span id="L365"><span class="lineNum">     365</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L366"><span class="lineNum">     366</span>                 :<span class="tlaGNC">       11291 :   function liquidationCall(</span></span>
<span id="L367"><span class="lineNum">     367</span>                 :             :     address collateralAsset,</span>
<span id="L368"><span class="lineNum">     368</span>                 :             :     address debtAsset,</span>
<span id="L369"><span class="lineNum">     369</span>                 :             :     address user,</span>
<span id="L370"><span class="lineNum">     370</span>                 :             :     uint256 debtToCover,</span>
<span id="L371"><span class="lineNum">     371</span>                 :             :     bool receiveAToken</span>
<span id="L372"><span class="lineNum">     372</span>                 :             :   ) public virtual override {</span>
<span id="L373"><span class="lineNum">     373</span>                 :<span class="tlaGNC">       22584 :     LiquidationLogic.executeLiquidationCall(</span></span>
<span id="L374"><span class="lineNum">     374</span>                 :             :       _reserves,</span>
<span id="L375"><span class="lineNum">     375</span>                 :             :       _reservesList,</span>
<span id="L376"><span class="lineNum">     376</span>                 :             :       _usersConfig,</span>
<span id="L377"><span class="lineNum">     377</span>                 :             :       _eModeCategories,</span>
<span id="L378"><span class="lineNum">     378</span>                 :             :       DataTypes.ExecuteLiquidationCallParams({</span>
<span id="L379"><span class="lineNum">     379</span>                 :             :         reservesCount: _reservesCount,</span>
<span id="L380"><span class="lineNum">     380</span>                 :             :         debtToCover: debtToCover,</span>
<span id="L381"><span class="lineNum">     381</span>                 :             :         collateralAsset: collateralAsset,</span>
<span id="L382"><span class="lineNum">     382</span>                 :             :         debtAsset: debtAsset,</span>
<span id="L383"><span class="lineNum">     383</span>                 :             :         user: user,</span>
<span id="L384"><span class="lineNum">     384</span>                 :             :         receiveAToken: receiveAToken,</span>
<span id="L385"><span class="lineNum">     385</span>                 :             :         priceOracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L386"><span class="lineNum">     386</span>                 :             :         userEModeCategory: _usersEModeCategory[user],</span>
<span id="L387"><span class="lineNum">     387</span>                 :             :         priceOracleSentinel: ADDRESSES_PROVIDER.getPriceOracleSentinel()</span>
<span id="L388"><span class="lineNum">     388</span>                 :             :       })</span>
<span id="L389"><span class="lineNum">     389</span>                 :             :     );</span>
<span id="L390"><span class="lineNum">     390</span>                 :             :   }</span>
<span id="L391"><span class="lineNum">     391</span>                 :             : </span>
<span id="L392"><span class="lineNum">     392</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L393"><span class="lineNum">     393</span>                 :<span class="tlaGNC">          10 :   function flashLoan(</span></span>
<span id="L394"><span class="lineNum">     394</span>                 :             :     address receiverAddress,</span>
<span id="L395"><span class="lineNum">     395</span>                 :             :     address[] calldata assets,</span>
<span id="L396"><span class="lineNum">     396</span>                 :             :     uint256[] calldata amounts,</span>
<span id="L397"><span class="lineNum">     397</span>                 :             :     uint256[] calldata interestRateModes,</span>
<span id="L398"><span class="lineNum">     398</span>                 :             :     address onBehalfOf,</span>
<span id="L399"><span class="lineNum">     399</span>                 :             :     bytes calldata params,</span>
<span id="L400"><span class="lineNum">     400</span>                 :             :     uint16 referralCode</span>
<span id="L401"><span class="lineNum">     401</span>                 :             :   ) public virtual override {</span>
<span id="L402"><span class="lineNum">     402</span>                 :<span class="tlaGNC">          30 :     DataTypes.FlashloanParams memory flashParams = DataTypes.FlashloanParams({</span></span>
<span id="L403"><span class="lineNum">     403</span>                 :             :       receiverAddress: receiverAddress,</span>
<span id="L404"><span class="lineNum">     404</span>                 :             :       assets: assets,</span>
<span id="L405"><span class="lineNum">     405</span>                 :             :       amounts: amounts,</span>
<span id="L406"><span class="lineNum">     406</span>                 :             :       interestRateModes: interestRateModes,</span>
<span id="L407"><span class="lineNum">     407</span>                 :             :       onBehalfOf: onBehalfOf,</span>
<span id="L408"><span class="lineNum">     408</span>                 :             :       params: params,</span>
<span id="L409"><span class="lineNum">     409</span>                 :             :       referralCode: referralCode,</span>
<span id="L410"><span class="lineNum">     410</span>                 :             :       flashLoanPremiumToProtocol: _flashLoanPremiumToProtocol,</span>
<span id="L411"><span class="lineNum">     411</span>                 :             :       flashLoanPremiumTotal: _flashLoanPremiumTotal,</span>
<span id="L412"><span class="lineNum">     412</span>                 :             :       maxStableRateBorrowSizePercent: _maxStableRateBorrowSizePercent,</span>
<span id="L413"><span class="lineNum">     413</span>                 :             :       reservesCount: _reservesCount,</span>
<span id="L414"><span class="lineNum">     414</span>                 :             :       addressesProvider: address(ADDRESSES_PROVIDER),</span>
<span id="L415"><span class="lineNum">     415</span>                 :             :       pool: address(this),</span>
<span id="L416"><span class="lineNum">     416</span>                 :             :       userEModeCategory: _usersEModeCategory[onBehalfOf],</span>
<span id="L417"><span class="lineNum">     417</span>                 :             :       isAuthorizedFlashBorrower: IACLManager(ADDRESSES_PROVIDER.getACLManager()).isFlashBorrower(</span>
<span id="L418"><span class="lineNum">     418</span>                 :             :         msg.sender</span>
<span id="L419"><span class="lineNum">     419</span>                 :             :       )</span>
<span id="L420"><span class="lineNum">     420</span>                 :             :     });</span>
<span id="L421"><span class="lineNum">     421</span>                 :             : </span>
<span id="L422"><span class="lineNum">     422</span>                 :<span class="tlaGNC">          20 :     FlashLoanLogic.executeFlashLoan(</span></span>
<span id="L423"><span class="lineNum">     423</span>                 :             :       _reserves,</span>
<span id="L424"><span class="lineNum">     424</span>                 :             :       _reservesList,</span>
<span id="L425"><span class="lineNum">     425</span>                 :             :       _eModeCategories,</span>
<span id="L426"><span class="lineNum">     426</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L427"><span class="lineNum">     427</span>                 :             :       flashParams</span>
<span id="L428"><span class="lineNum">     428</span>                 :             :     );</span>
<span id="L429"><span class="lineNum">     429</span>                 :             :   }</span>
<span id="L430"><span class="lineNum">     430</span>                 :             : </span>
<span id="L431"><span class="lineNum">     431</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L432"><span class="lineNum">     432</span>                 :<span class="tlaGNC">          10 :   function flashLoanSimple(</span></span>
<span id="L433"><span class="lineNum">     433</span>                 :             :     address receiverAddress,</span>
<span id="L434"><span class="lineNum">     434</span>                 :             :     address asset,</span>
<span id="L435"><span class="lineNum">     435</span>                 :             :     uint256 amount,</span>
<span id="L436"><span class="lineNum">     436</span>                 :             :     bytes calldata params,</span>
<span id="L437"><span class="lineNum">     437</span>                 :             :     uint16 referralCode</span>
<span id="L438"><span class="lineNum">     438</span>                 :             :   ) public virtual override {</span>
<span id="L439"><span class="lineNum">     439</span>                 :<span class="tlaGNC">          30 :     DataTypes.FlashloanSimpleParams memory flashParams = DataTypes.FlashloanSimpleParams({</span></span>
<span id="L440"><span class="lineNum">     440</span>                 :             :       receiverAddress: receiverAddress,</span>
<span id="L441"><span class="lineNum">     441</span>                 :             :       asset: asset,</span>
<span id="L442"><span class="lineNum">     442</span>                 :             :       amount: amount,</span>
<span id="L443"><span class="lineNum">     443</span>                 :             :       params: params,</span>
<span id="L444"><span class="lineNum">     444</span>                 :             :       referralCode: referralCode,</span>
<span id="L445"><span class="lineNum">     445</span>                 :             :       flashLoanPremiumToProtocol: _flashLoanPremiumToProtocol,</span>
<span id="L446"><span class="lineNum">     446</span>                 :             :       flashLoanPremiumTotal: _flashLoanPremiumTotal</span>
<span id="L447"><span class="lineNum">     447</span>                 :             :     });</span>
<span id="L448"><span class="lineNum">     448</span>                 :<span class="tlaGNC">          20 :     FlashLoanLogic.executeFlashLoanSimple(_reserves[asset], flashParams);</span></span>
<span id="L449"><span class="lineNum">     449</span>                 :             :   }</span>
<span id="L450"><span class="lineNum">     450</span>                 :             : </span>
<span id="L451"><span class="lineNum">     451</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L452"><span class="lineNum">     452</span>                 :<span class="tlaGNC">           4 :   function mintToTreasury(address[] calldata assets) external virtual override {</span></span>
<span id="L453"><span class="lineNum">     453</span>                 :<span class="tlaGNC">           8 :     PoolLogic.executeMintToTreasury(_reserves, assets);</span></span>
<span id="L454"><span class="lineNum">     454</span>                 :             :   }</span>
<span id="L455"><span class="lineNum">     455</span>                 :             : </span>
<span id="L456"><span class="lineNum">     456</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L457"><span class="lineNum">     457</span>                 :<span class="tlaGNC">           6 :   function getReserveDataExtended(</span></span>
<span id="L458"><span class="lineNum">     458</span>                 :             :     address asset</span>
<span id="L459"><span class="lineNum">     459</span>                 :             :   ) external view returns (DataTypes.ReserveData memory) {</span>
<span id="L460"><span class="lineNum">     460</span>                 :<span class="tlaGNC">          12 :     return _reserves[asset];</span></span>
<span id="L461"><span class="lineNum">     461</span>                 :             :   }</span>
<span id="L462"><span class="lineNum">     462</span>                 :             : </span>
<span id="L463"><span class="lineNum">     463</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L464"><span class="lineNum">     464</span>                 :<span class="tlaGNC">       22204 :   function getReserveData(</span></span>
<span id="L465"><span class="lineNum">     465</span>                 :             :     address asset</span>
<span id="L466"><span class="lineNum">     466</span>                 :             :   ) external view virtual override returns (DataTypes.ReserveDataLegacy memory) {</span>
<span id="L467"><span class="lineNum">     467</span>                 :<span class="tlaGNC">       44408 :     DataTypes.ReserveData memory reserve = _reserves[asset];</span></span>
<span id="L468"><span class="lineNum">     468</span>                 :<span class="tlaGNC">       44408 :     DataTypes.ReserveDataLegacy memory res;</span></span>
<span id="L469"><span class="lineNum">     469</span>                 :             : </span>
<span id="L470"><span class="lineNum">     470</span>                 :<span class="tlaGNC">       44408 :     res.configuration = reserve.configuration;</span></span>
<span id="L471"><span class="lineNum">     471</span>                 :<span class="tlaGNC">       44408 :     res.liquidityIndex = reserve.liquidityIndex;</span></span>
<span id="L472"><span class="lineNum">     472</span>                 :<span class="tlaGNC">       44408 :     res.currentLiquidityRate = reserve.currentLiquidityRate;</span></span>
<span id="L473"><span class="lineNum">     473</span>                 :<span class="tlaGNC">       44408 :     res.variableBorrowIndex = reserve.variableBorrowIndex;</span></span>
<span id="L474"><span class="lineNum">     474</span>                 :<span class="tlaGNC">       44408 :     res.currentVariableBorrowRate = reserve.currentVariableBorrowRate;</span></span>
<span id="L475"><span class="lineNum">     475</span>                 :<span class="tlaGNC">       44408 :     res.currentStableBorrowRate = reserve.currentStableBorrowRate;</span></span>
<span id="L476"><span class="lineNum">     476</span>                 :<span class="tlaGNC">       44408 :     res.lastUpdateTimestamp = reserve.lastUpdateTimestamp;</span></span>
<span id="L477"><span class="lineNum">     477</span>                 :<span class="tlaGNC">       44408 :     res.id = reserve.id;</span></span>
<span id="L478"><span class="lineNum">     478</span>                 :<span class="tlaGNC">       44408 :     res.aTokenAddress = reserve.aTokenAddress;</span></span>
<span id="L479"><span class="lineNum">     479</span>                 :<span class="tlaGNC">       44408 :     res.stableDebtTokenAddress = reserve.stableDebtTokenAddress;</span></span>
<span id="L480"><span class="lineNum">     480</span>                 :<span class="tlaGNC">       44408 :     res.variableDebtTokenAddress = reserve.variableDebtTokenAddress;</span></span>
<span id="L481"><span class="lineNum">     481</span>                 :<span class="tlaGNC">       44408 :     res.interestRateStrategyAddress = reserve.interestRateStrategyAddress;</span></span>
<span id="L482"><span class="lineNum">     482</span>                 :<span class="tlaGNC">       44408 :     res.accruedToTreasury = reserve.accruedToTreasury;</span></span>
<span id="L483"><span class="lineNum">     483</span>                 :<span class="tlaGNC">       44408 :     res.unbacked = reserve.unbacked;</span></span>
<span id="L484"><span class="lineNum">     484</span>                 :<span class="tlaGNC">       44408 :     res.isolationModeTotalDebt = reserve.isolationModeTotalDebt;</span></span>
<span id="L485"><span class="lineNum">     485</span>                 :<span class="tlaGNC">       44408 :     return res;</span></span>
<span id="L486"><span class="lineNum">     486</span>                 :             :   }</span>
<span id="L487"><span class="lineNum">     487</span>                 :             : </span>
<span id="L488"><span class="lineNum">     488</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L489"><span class="lineNum">     489</span>                 :<span class="tlaGNC">        6030 :   function getVirtualUnderlyingBalance(</span></span>
<span id="L490"><span class="lineNum">     490</span>                 :             :     address asset</span>
<span id="L491"><span class="lineNum">     491</span>                 :             :   ) external view virtual override returns (uint128) {</span>
<span id="L492"><span class="lineNum">     492</span>                 :<span class="tlaGNC">       12060 :     return _reserves[asset].virtualUnderlyingBalance;</span></span>
<span id="L493"><span class="lineNum">     493</span>                 :             :   }</span>
<span id="L494"><span class="lineNum">     494</span>                 :             : </span>
<span id="L495"><span class="lineNum">     495</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L496"><span class="lineNum">     496</span>                 :<span class="tlaGNC">        3013 :   function getUserAccountData(</span></span>
<span id="L497"><span class="lineNum">     497</span>                 :             :     address user</span>
<span id="L498"><span class="lineNum">     498</span>                 :             :   )</span>
<span id="L499"><span class="lineNum">     499</span>                 :             :     external</span>
<span id="L500"><span class="lineNum">     500</span>                 :             :     view</span>
<span id="L501"><span class="lineNum">     501</span>                 :             :     virtual</span>
<span id="L502"><span class="lineNum">     502</span>                 :             :     override</span>
<span id="L503"><span class="lineNum">     503</span>                 :             :     returns (</span>
<span id="L504"><span class="lineNum">     504</span>                 :             :       uint256 totalCollateralBase,</span>
<span id="L505"><span class="lineNum">     505</span>                 :             :       uint256 totalDebtBase,</span>
<span id="L506"><span class="lineNum">     506</span>                 :             :       uint256 availableBorrowsBase,</span>
<span id="L507"><span class="lineNum">     507</span>                 :             :       uint256 currentLiquidationThreshold,</span>
<span id="L508"><span class="lineNum">     508</span>                 :             :       uint256 ltv,</span>
<span id="L509"><span class="lineNum">     509</span>                 :             :       uint256 healthFactor</span>
<span id="L510"><span class="lineNum">     510</span>                 :             :     )</span>
<span id="L511"><span class="lineNum">     511</span>                 :             :   {</span>
<span id="L512"><span class="lineNum">     512</span>                 :<span class="tlaGNC">        6026 :     return</span></span>
<span id="L513"><span class="lineNum">     513</span>                 :<span class="tlaGNC">        6026 :       PoolLogic.executeGetUserAccountData(</span></span>
<span id="L514"><span class="lineNum">     514</span>                 :             :         _reserves,</span>
<span id="L515"><span class="lineNum">     515</span>                 :             :         _reservesList,</span>
<span id="L516"><span class="lineNum">     516</span>                 :             :         _eModeCategories,</span>
<span id="L517"><span class="lineNum">     517</span>                 :             :         DataTypes.CalculateUserAccountDataParams({</span>
<span id="L518"><span class="lineNum">     518</span>                 :             :           userConfig: _usersConfig[user],</span>
<span id="L519"><span class="lineNum">     519</span>                 :             :           reservesCount: _reservesCount,</span>
<span id="L520"><span class="lineNum">     520</span>                 :             :           user: user,</span>
<span id="L521"><span class="lineNum">     521</span>                 :             :           oracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L522"><span class="lineNum">     522</span>                 :             :           userEModeCategory: _usersEModeCategory[user]</span>
<span id="L523"><span class="lineNum">     523</span>                 :             :         })</span>
<span id="L524"><span class="lineNum">     524</span>                 :             :       );</span>
<span id="L525"><span class="lineNum">     525</span>                 :             :   }</span>
<span id="L526"><span class="lineNum">     526</span>                 :             : </span>
<span id="L527"><span class="lineNum">     527</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L528"><span class="lineNum">     528</span>                 :<span class="tlaGNC">       41450 :   function getConfiguration(</span></span>
<span id="L529"><span class="lineNum">     529</span>                 :             :     address asset</span>
<span id="L530"><span class="lineNum">     530</span>                 :             :   ) external view virtual override returns (DataTypes.ReserveConfigurationMap memory) {</span>
<span id="L531"><span class="lineNum">     531</span>                 :<span class="tlaGNC">       82900 :     return _reserves[asset].configuration;</span></span>
<span id="L532"><span class="lineNum">     532</span>                 :             :   }</span>
<span id="L533"><span class="lineNum">     533</span>                 :             : </span>
<span id="L534"><span class="lineNum">     534</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L535"><span class="lineNum">     535</span>                 :<span class="tlaGNC">        6030 :   function getUserConfiguration(</span></span>
<span id="L536"><span class="lineNum">     536</span>                 :             :     address user</span>
<span id="L537"><span class="lineNum">     537</span>                 :             :   ) external view virtual override returns (DataTypes.UserConfigurationMap memory) {</span>
<span id="L538"><span class="lineNum">     538</span>                 :<span class="tlaGNC">       12060 :     return _usersConfig[user];</span></span>
<span id="L539"><span class="lineNum">     539</span>                 :             :   }</span>
<span id="L540"><span class="lineNum">     540</span>                 :             : </span>
<span id="L541"><span class="lineNum">     541</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L542"><span class="lineNum">     542</span>                 :<span class="tlaGNC">       31404 :   function getReserveNormalizedIncome(</span></span>
<span id="L543"><span class="lineNum">     543</span>                 :             :     address asset</span>
<span id="L544"><span class="lineNum">     544</span>                 :             :   ) external view virtual override returns (uint256) {</span>
<span id="L545"><span class="lineNum">     545</span>                 :<span class="tlaGNC">       94212 :     return _reserves[asset].getNormalizedIncome();</span></span>
<span id="L546"><span class="lineNum">     546</span>                 :             :   }</span>
<span id="L547"><span class="lineNum">     547</span>                 :             : </span>
<span id="L548"><span class="lineNum">     548</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L549"><span class="lineNum">     549</span>                 :<span class="tlaGNC">       25218 :   function getReserveNormalizedVariableDebt(</span></span>
<span id="L550"><span class="lineNum">     550</span>                 :             :     address asset</span>
<span id="L551"><span class="lineNum">     551</span>                 :             :   ) external view virtual override returns (uint256) {</span>
<span id="L552"><span class="lineNum">     552</span>                 :<span class="tlaGNC">       75654 :     return _reserves[asset].getNormalizedDebt();</span></span>
<span id="L553"><span class="lineNum">     553</span>                 :             :   }</span>
<span id="L554"><span class="lineNum">     554</span>                 :             : </span>
<span id="L555"><span class="lineNum">     555</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L556"><span class="lineNum">     556</span>                 :<span class="tlaGNC">        6043 :   function getReservesList() external view virtual override returns (address[] memory) {</span></span>
<span id="L557"><span class="lineNum">     557</span>                 :<span class="tlaGNC">       12086 :     uint256 reservesListCount = _reservesCount;</span></span>
<span id="L558"><span class="lineNum">     558</span>                 :<span class="tlaGNC">       12086 :     uint256 droppedReservesCount = 0;</span></span>
<span id="L559"><span class="lineNum">     559</span>                 :<span class="tlaGNC">       18129 :     address[] memory reservesList = new address[](reservesListCount);</span></span>
<span id="L560"><span class="lineNum">     560</span>                 :             : </span>
<span id="L561"><span class="lineNum">     561</span>                 :<span class="tlaGNC">       56395 :     for (uint256 i = 0; i &lt; reservesListCount; i++) {</span></span>
<span id="L562"><span class="lineNum">     562</span>                 :<span class="tlaGNC">       57399 :       if (_reservesList[i] != address(0)) {</span></span>
<span id="L563"><span class="lineNum">     563</span>                 :<span class="tlaGNC">       38264 :         reservesList[i - droppedReservesCount] = _reservesList[i];</span></span>
<span id="L564"><span class="lineNum">     564</span>                 :             :       } else {</span>
<span id="L565"><span class="lineNum">     565</span>                 :<span class="tlaGNC">           2 :         droppedReservesCount++;</span></span>
<span id="L566"><span class="lineNum">     566</span>                 :             :       }</span>
<span id="L567"><span class="lineNum">     567</span>                 :             :     }</span>
<span id="L568"><span class="lineNum">     568</span>                 :             : </span>
<span id="L569"><span class="lineNum">     569</span>                 :             :     // Reduces the length of the reserves array by `droppedReservesCount`</span>
<span id="L570"><span class="lineNum">     570</span>                 :             :     assembly {</span>
<span id="L571"><span class="lineNum">     571</span>                 :             :       mstore(reservesList, sub(reservesListCount, droppedReservesCount))</span>
<span id="L572"><span class="lineNum">     572</span>                 :             :     }</span>
<span id="L573"><span class="lineNum">     573</span>                 :<span class="tlaGNC">       12086 :     return reservesList;</span></span>
<span id="L574"><span class="lineNum">     574</span>                 :             :   }</span>
<span id="L575"><span class="lineNum">     575</span>                 :             : </span>
<span id="L576"><span class="lineNum">     576</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L577"><span class="lineNum">     577</span>                 :<span class="tlaGNC">           1 :   function getReservesCount() external view virtual override returns (uint256) {</span></span>
<span id="L578"><span class="lineNum">     578</span>                 :<span class="tlaGNC">           2 :     return _reservesCount;</span></span>
<span id="L579"><span class="lineNum">     579</span>                 :             :   }</span>
<span id="L580"><span class="lineNum">     580</span>                 :             : </span>
<span id="L581"><span class="lineNum">     581</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L582"><span class="lineNum">     582</span>                 :<span class="tlaGNC">           1 :   function getReserveAddressById(uint16 id) external view returns (address) {</span></span>
<span id="L583"><span class="lineNum">     583</span>                 :<span class="tlaGNC">           2 :     return _reservesList[id];</span></span>
<span id="L584"><span class="lineNum">     584</span>                 :             :   }</span>
<span id="L585"><span class="lineNum">     585</span>                 :             : </span>
<span id="L586"><span class="lineNum">     586</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L587"><span class="lineNum">     587</span>                 :<span class="tlaGNC">           3 :   function MAX_STABLE_RATE_BORROW_SIZE_PERCENT() public view virtual override returns (uint256) {</span></span>
<span id="L588"><span class="lineNum">     588</span>                 :<span class="tlaGNC">           6 :     return _maxStableRateBorrowSizePercent;</span></span>
<span id="L589"><span class="lineNum">     589</span>                 :             :   }</span>
<span id="L590"><span class="lineNum">     590</span>                 :             : </span>
<span id="L591"><span class="lineNum">     591</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L592"><span class="lineNum">     592</span>                 :<span class="tlaGNC">          25 :   function BRIDGE_PROTOCOL_FEE() public view virtual override returns (uint256) {</span></span>
<span id="L593"><span class="lineNum">     593</span>                 :<span class="tlaGNC">          50 :     return _bridgeProtocolFee;</span></span>
<span id="L594"><span class="lineNum">     594</span>                 :             :   }</span>
<span id="L595"><span class="lineNum">     595</span>                 :             : </span>
<span id="L596"><span class="lineNum">     596</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L597"><span class="lineNum">     597</span>                 :<span class="tlaGNC">        1218 :   function FLASHLOAN_PREMIUM_TOTAL() public view virtual override returns (uint128) {</span></span>
<span id="L598"><span class="lineNum">     598</span>                 :<span class="tlaGNC">        2436 :     return _flashLoanPremiumTotal;</span></span>
<span id="L599"><span class="lineNum">     599</span>                 :             :   }</span>
<span id="L600"><span class="lineNum">     600</span>                 :             : </span>
<span id="L601"><span class="lineNum">     601</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L602"><span class="lineNum">     602</span>                 :<span class="tlaGNC">        1215 :   function FLASHLOAN_PREMIUM_TO_PROTOCOL() public view virtual override returns (uint128) {</span></span>
<span id="L603"><span class="lineNum">     603</span>                 :<span class="tlaGNC">        2430 :     return _flashLoanPremiumToProtocol;</span></span>
<span id="L604"><span class="lineNum">     604</span>                 :             :   }</span>
<span id="L605"><span class="lineNum">     605</span>                 :             : </span>
<span id="L606"><span class="lineNum">     606</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L607"><span class="lineNum">     607</span>                 :<span class="tlaGNC">           3 :   function MAX_NUMBER_RESERVES() public view virtual override returns (uint16) {</span></span>
<span id="L608"><span class="lineNum">     608</span>                 :<span class="tlaGNC">        5770 :     return ReserveConfiguration.MAX_RESERVES_COUNT;</span></span>
<span id="L609"><span class="lineNum">     609</span>                 :             :   }</span>
<span id="L610"><span class="lineNum">     610</span>                 :             : </span>
<span id="L611"><span class="lineNum">     611</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L612"><span class="lineNum">     612</span>                 :<span class="tlaGNC">        1036 :   function finalizeTransfer(</span></span>
<span id="L613"><span class="lineNum">     613</span>                 :             :     address asset,</span>
<span id="L614"><span class="lineNum">     614</span>                 :             :     address from,</span>
<span id="L615"><span class="lineNum">     615</span>                 :             :     address to,</span>
<span id="L616"><span class="lineNum">     616</span>                 :             :     uint256 amount,</span>
<span id="L617"><span class="lineNum">     617</span>                 :             :     uint256 balanceFromBefore,</span>
<span id="L618"><span class="lineNum">     618</span>                 :             :     uint256 balanceToBefore</span>
<span id="L619"><span class="lineNum">     619</span>                 :             :   ) external virtual override {</span>
<span id="L620"><span class="lineNum">     620</span>                 :<span class="tlaGNC">        2072 :     require(msg.sender == _reserves[asset].aTokenAddress, Errors.CALLER_NOT_ATOKEN);</span></span>
<span id="L621"><span class="lineNum">     621</span>                 :<span class="tlaGNC">        2072 :     SupplyLogic.executeFinalizeTransfer(</span></span>
<span id="L622"><span class="lineNum">     622</span>                 :             :       _reserves,</span>
<span id="L623"><span class="lineNum">     623</span>                 :             :       _reservesList,</span>
<span id="L624"><span class="lineNum">     624</span>                 :             :       _eModeCategories,</span>
<span id="L625"><span class="lineNum">     625</span>                 :             :       _usersConfig,</span>
<span id="L626"><span class="lineNum">     626</span>                 :             :       DataTypes.FinalizeTransferParams({</span>
<span id="L627"><span class="lineNum">     627</span>                 :             :         asset: asset,</span>
<span id="L628"><span class="lineNum">     628</span>                 :             :         from: from,</span>
<span id="L629"><span class="lineNum">     629</span>                 :             :         to: to,</span>
<span id="L630"><span class="lineNum">     630</span>                 :             :         amount: amount,</span>
<span id="L631"><span class="lineNum">     631</span>                 :             :         balanceFromBefore: balanceFromBefore,</span>
<span id="L632"><span class="lineNum">     632</span>                 :             :         balanceToBefore: balanceToBefore,</span>
<span id="L633"><span class="lineNum">     633</span>                 :             :         reservesCount: _reservesCount,</span>
<span id="L634"><span class="lineNum">     634</span>                 :             :         oracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L635"><span class="lineNum">     635</span>                 :             :         fromEModeCategory: _usersEModeCategory[from]</span>
<span id="L636"><span class="lineNum">     636</span>                 :             :       })</span>
<span id="L637"><span class="lineNum">     637</span>                 :             :     );</span>
<span id="L638"><span class="lineNum">     638</span>                 :             :   }</span>
<span id="L639"><span class="lineNum">     639</span>                 :             : </span>
<span id="L640"><span class="lineNum">     640</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L641"><span class="lineNum">     641</span>                 :<span class="tlaGNC">        6882 :   function initReserve(</span></span>
<span id="L642"><span class="lineNum">     642</span>                 :             :     address asset,</span>
<span id="L643"><span class="lineNum">     643</span>                 :             :     address aTokenAddress,</span>
<span id="L644"><span class="lineNum">     644</span>                 :             :     address stableDebtAddress,</span>
<span id="L645"><span class="lineNum">     645</span>                 :             :     address variableDebtAddress,</span>
<span id="L646"><span class="lineNum">     646</span>                 :             :     address interestRateStrategyAddress</span>
<span id="L647"><span class="lineNum">     647</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L648"><span class="lineNum">     648</span>                 :             :     if (</span>
<span id="L649"><span class="lineNum">     649</span>                 :<span class="tlaGNC">        5764 :       PoolLogic.executeInitReserve(</span></span>
<span id="L650"><span class="lineNum">     650</span>                 :             :         _reserves,</span>
<span id="L651"><span class="lineNum">     651</span>                 :             :         _reservesList,</span>
<span id="L652"><span class="lineNum">     652</span>                 :             :         DataTypes.InitReserveParams({</span>
<span id="L653"><span class="lineNum">     653</span>                 :             :           asset: asset,</span>
<span id="L654"><span class="lineNum">     654</span>                 :             :           aTokenAddress: aTokenAddress,</span>
<span id="L655"><span class="lineNum">     655</span>                 :             :           stableDebtAddress: stableDebtAddress,</span>
<span id="L656"><span class="lineNum">     656</span>                 :             :           variableDebtAddress: variableDebtAddress,</span>
<span id="L657"><span class="lineNum">     657</span>                 :             :           interestRateStrategyAddress: interestRateStrategyAddress,</span>
<span id="L658"><span class="lineNum">     658</span>                 :             :           reservesCount: _reservesCount,</span>
<span id="L659"><span class="lineNum">     659</span>                 :             :           maxNumberReserves: MAX_NUMBER_RESERVES()</span>
<span id="L660"><span class="lineNum">     660</span>                 :             :         })</span>
<span id="L661"><span class="lineNum">     661</span>                 :             :       )</span>
<span id="L662"><span class="lineNum">     662</span>                 :             :     ) {</span>
<span id="L663"><span class="lineNum">     663</span>                 :<span class="tlaGNC">        5762 :       _reservesCount++;</span></span>
<span id="L664"><span class="lineNum">     664</span>                 :             :     }</span>
<span id="L665"><span class="lineNum">     665</span>                 :             :   }</span>
<span id="L666"><span class="lineNum">     666</span>                 :             : </span>
<span id="L667"><span class="lineNum">     667</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L668"><span class="lineNum">     668</span>                 :<span class="tlaGNC">        2007 :   function dropReserve(address asset) external virtual override onlyPoolConfigurator {</span></span>
<span id="L669"><span class="lineNum">     669</span>                 :<span class="tlaGNC">          14 :     PoolLogic.executeDropReserve(_reserves, _reservesList, asset);</span></span>
<span id="L670"><span class="lineNum">     670</span>                 :             :   }</span>
<span id="L671"><span class="lineNum">     671</span>                 :             : </span>
<span id="L672"><span class="lineNum">     672</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L673"><span class="lineNum">     673</span>                 :<span class="tlaGNC">        6006 :   function setReserveInterestRateStrategyAddress(</span></span>
<span id="L674"><span class="lineNum">     674</span>                 :             :     address asset,</span>
<span id="L675"><span class="lineNum">     675</span>                 :             :     address rateStrategyAddress</span>
<span id="L676"><span class="lineNum">     676</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L677"><span class="lineNum">     677</span>                 :<span class="tlaGNC">        8012 :     require(asset != address(0), Errors.ZERO_ADDRESS_NOT_VALID);</span></span>
<span id="L678"><span class="lineNum">     678</span>                 :<span class="tlaGNC">        4012 :     require(_reserves[asset].id != 0 || _reservesList[0] == asset, Errors.ASSET_NOT_LISTED);</span></span>
<span id="L679"><span class="lineNum">     679</span>                 :             : </span>
<span id="L680"><span class="lineNum">     680</span>                 :<span class="tlaGNC">          12 :     _reserves[asset].interestRateStrategyAddress = rateStrategyAddress;</span></span>
<span id="L681"><span class="lineNum">     681</span>                 :             :   }</span>
<span id="L682"><span class="lineNum">     682</span>                 :             : </span>
<span id="L683"><span class="lineNum">     683</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L684"><span class="lineNum">     684</span>                 :<span class="tlaGNC">        1751 :   function syncIndexesState(address asset) external virtual override onlyPoolConfigurator {</span></span>
<span id="L685"><span class="lineNum">     685</span>                 :<span class="tlaGNC">        3502 :     DataTypes.ReserveData storage reserve = _reserves[asset];</span></span>
<span id="L686"><span class="lineNum">     686</span>                 :<span class="tlaGNC">        5253 :     DataTypes.ReserveCache memory reserveCache = reserve.cache();</span></span>
<span id="L687"><span class="lineNum">     687</span>                 :             : </span>
<span id="L688"><span class="lineNum">     688</span>                 :<span class="tlaGNC">        3502 :     reserve.updateState(reserveCache);</span></span>
<span id="L689"><span class="lineNum">     689</span>                 :             :   }</span>
<span id="L690"><span class="lineNum">     690</span>                 :             : </span>
<span id="L691"><span class="lineNum">     691</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L692"><span class="lineNum">     692</span>                 :<span class="tlaGNC">        1751 :   function syncRatesState(address asset) external virtual override onlyPoolConfigurator {</span></span>
<span id="L693"><span class="lineNum">     693</span>                 :<span class="tlaGNC">        3502 :     DataTypes.ReserveData storage reserve = _reserves[asset];</span></span>
<span id="L694"><span class="lineNum">     694</span>                 :<span class="tlaGNC">        5253 :     DataTypes.ReserveCache memory reserveCache = reserve.cache();</span></span>
<span id="L695"><span class="lineNum">     695</span>                 :             : </span>
<span id="L696"><span class="lineNum">     696</span>                 :<span class="tlaGNC">        3502 :     ReserveLogic.updateInterestRatesAndVirtualBalance(reserve, reserveCache, asset, 0, 0);</span></span>
<span id="L697"><span class="lineNum">     697</span>                 :             :   }</span>
<span id="L698"><span class="lineNum">     698</span>                 :             : </span>
<span id="L699"><span class="lineNum">     699</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L700"><span class="lineNum">     700</span>                 :<span class="tlaGNC">       38058 :   function setConfiguration(</span></span>
<span id="L701"><span class="lineNum">     701</span>                 :             :     address asset,</span>
<span id="L702"><span class="lineNum">     702</span>                 :             :     DataTypes.ReserveConfigurationMap calldata configuration</span>
<span id="L703"><span class="lineNum">     703</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L704"><span class="lineNum">     704</span>                 :<span class="tlaGNC">       72116 :     require(asset != address(0), Errors.ZERO_ADDRESS_NOT_VALID);</span></span>
<span id="L705"><span class="lineNum">     705</span>                 :<span class="tlaGNC">       72116 :     require(_reserves[asset].id != 0 || _reservesList[0] == asset, Errors.ASSET_NOT_LISTED);</span></span>
<span id="L706"><span class="lineNum">     706</span>                 :<span class="tlaGNC">       72116 :     _reserves[asset].configuration = configuration;</span></span>
<span id="L707"><span class="lineNum">     707</span>                 :             :   }</span>
<span id="L708"><span class="lineNum">     708</span>                 :             : </span>
<span id="L709"><span class="lineNum">     709</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L710"><span class="lineNum">     710</span>                 :<span class="tlaGNC">        2013 :   function updateBridgeProtocolFee(</span></span>
<span id="L711"><span class="lineNum">     711</span>                 :             :     uint256 protocolFee</span>
<span id="L712"><span class="lineNum">     712</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L713"><span class="lineNum">     713</span>                 :<span class="tlaGNC">          26 :     _bridgeProtocolFee = protocolFee;</span></span>
<span id="L714"><span class="lineNum">     714</span>                 :             :   }</span>
<span id="L715"><span class="lineNum">     715</span>                 :             : </span>
<span id="L716"><span class="lineNum">     716</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L717"><span class="lineNum">     717</span>                 :<span class="tlaGNC">        3212 :   function updateFlashloanPremiums(</span></span>
<span id="L718"><span class="lineNum">     718</span>                 :             :     uint128 flashLoanPremiumTotal,</span>
<span id="L719"><span class="lineNum">     719</span>                 :             :     uint128 flashLoanPremiumToProtocol</span>
<span id="L720"><span class="lineNum">     720</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L721"><span class="lineNum">     721</span>                 :<span class="tlaGNC">        2424 :     _flashLoanPremiumTotal = flashLoanPremiumTotal;</span></span>
<span id="L722"><span class="lineNum">     722</span>                 :<span class="tlaGNC">        2424 :     _flashLoanPremiumToProtocol = flashLoanPremiumToProtocol;</span></span>
<span id="L723"><span class="lineNum">     723</span>                 :             :   }</span>
<span id="L724"><span class="lineNum">     724</span>                 :             : </span>
<span id="L725"><span class="lineNum">     725</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L726"><span class="lineNum">     726</span>                 :<span class="tlaGNC">        2027 :   function configureEModeCategory(</span></span>
<span id="L727"><span class="lineNum">     727</span>                 :             :     uint8 id,</span>
<span id="L728"><span class="lineNum">     728</span>                 :             :     DataTypes.EModeCategory memory category</span>
<span id="L729"><span class="lineNum">     729</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L730"><span class="lineNum">     730</span>                 :             :     // category 0 is reserved for volatile heterogeneous assets and it's always disabled</span>
<span id="L731"><span class="lineNum">     731</span>                 :<span class="tlaGNC">          54 :     require(id != 0, Errors.EMODE_CATEGORY_RESERVED);</span></span>
<span id="L732"><span class="lineNum">     732</span>                 :<span class="tlaGNC">          54 :     _eModeCategories[id] = category;</span></span>
<span id="L733"><span class="lineNum">     733</span>                 :             :   }</span>
<span id="L734"><span class="lineNum">     734</span>                 :             : </span>
<span id="L735"><span class="lineNum">     735</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L736"><span class="lineNum">     736</span>                 :<span class="tlaGNC">          46 :   function getEModeCategoryData(</span></span>
<span id="L737"><span class="lineNum">     737</span>                 :             :     uint8 id</span>
<span id="L738"><span class="lineNum">     738</span>                 :             :   ) external view virtual override returns (DataTypes.EModeCategory memory) {</span>
<span id="L739"><span class="lineNum">     739</span>                 :<span class="tlaGNC">          92 :     return _eModeCategories[id];</span></span>
<span id="L740"><span class="lineNum">     740</span>                 :             :   }</span>
<span id="L741"><span class="lineNum">     741</span>                 :             : </span>
<span id="L742"><span class="lineNum">     742</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L743"><span class="lineNum">     743</span>                 :<span class="tlaGNC">          17 :   function setUserEMode(uint8 categoryId) external virtual override {</span></span>
<span id="L744"><span class="lineNum">     744</span>                 :<span class="tlaGNC">          34 :     EModeLogic.executeSetUserEMode(</span></span>
<span id="L745"><span class="lineNum">     745</span>                 :             :       _reserves,</span>
<span id="L746"><span class="lineNum">     746</span>                 :             :       _reservesList,</span>
<span id="L747"><span class="lineNum">     747</span>                 :             :       _eModeCategories,</span>
<span id="L748"><span class="lineNum">     748</span>                 :             :       _usersEModeCategory,</span>
<span id="L749"><span class="lineNum">     749</span>                 :             :       _usersConfig[msg.sender],</span>
<span id="L750"><span class="lineNum">     750</span>                 :             :       DataTypes.ExecuteSetUserEModeParams({</span>
<span id="L751"><span class="lineNum">     751</span>                 :             :         reservesCount: _reservesCount,</span>
<span id="L752"><span class="lineNum">     752</span>                 :             :         oracle: ADDRESSES_PROVIDER.getPriceOracle(),</span>
<span id="L753"><span class="lineNum">     753</span>                 :             :         categoryId: categoryId</span>
<span id="L754"><span class="lineNum">     754</span>                 :             :       })</span>
<span id="L755"><span class="lineNum">     755</span>                 :             :     );</span>
<span id="L756"><span class="lineNum">     756</span>                 :             :   }</span>
<span id="L757"><span class="lineNum">     757</span>                 :             : </span>
<span id="L758"><span class="lineNum">     758</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L759"><span class="lineNum">     759</span>                 :<span class="tlaGNC">        3012 :   function getUserEMode(address user) external view virtual override returns (uint256) {</span></span>
<span id="L760"><span class="lineNum">     760</span>                 :<span class="tlaGNC">        6024 :     return _usersEModeCategory[user];</span></span>
<span id="L761"><span class="lineNum">     761</span>                 :             :   }</span>
<span id="L762"><span class="lineNum">     762</span>                 :             : </span>
<span id="L763"><span class="lineNum">     763</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L764"><span class="lineNum">     764</span>                 :<span class="tlaGNC">        3751 :   function resetIsolationModeTotalDebt(</span></span>
<span id="L765"><span class="lineNum">     765</span>                 :             :     address asset</span>
<span id="L766"><span class="lineNum">     766</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L767"><span class="lineNum">     767</span>                 :<span class="tlaGNC">        3502 :     PoolLogic.executeResetIsolationModeTotalDebt(_reserves, asset);</span></span>
<span id="L768"><span class="lineNum">     768</span>                 :             :   }</span>
<span id="L769"><span class="lineNum">     769</span>                 :             : </span>
<span id="L770"><span class="lineNum">     770</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L771"><span class="lineNum">     771</span>                 :<span class="tlaGNC">        5512 :   function getLiquidationGracePeriod(address asset) external virtual override returns (uint40) {</span></span>
<span id="L772"><span class="lineNum">     772</span>                 :<span class="tlaGNC">       11024 :     return _reserves[asset].liquidationGracePeriodUntil;</span></span>
<span id="L773"><span class="lineNum">     773</span>                 :             :   }</span>
<span id="L774"><span class="lineNum">     774</span>                 :             : </span>
<span id="L775"><span class="lineNum">     775</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L776"><span class="lineNum">     776</span>                 :<span class="tlaGNC">       13028 :   function setLiquidationGracePeriod(</span></span>
<span id="L777"><span class="lineNum">     777</span>                 :             :     address asset,</span>
<span id="L778"><span class="lineNum">     778</span>                 :             :     uint40 until</span>
<span id="L779"><span class="lineNum">     779</span>                 :             :   ) external virtual override onlyPoolConfigurator {</span>
<span id="L780"><span class="lineNum">     780</span>                 :<span class="tlaGNC">       22056 :     require(_reserves[asset].id != 0 || _reservesList[0] == asset, Errors.ASSET_NOT_LISTED);</span></span>
<span id="L781"><span class="lineNum">     781</span>                 :<span class="tlaGNC">       18056 :     PoolLogic.executeSetLiquidationGracePeriod(_reserves, asset, until);</span></span>
<span id="L782"><span class="lineNum">     782</span>                 :             :   }</span>
<span id="L783"><span class="lineNum">     783</span>                 :             : </span>
<span id="L784"><span class="lineNum">     784</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L785"><span class="lineNum">     785</span>                 :<span class="tlaGNC">        2000 :   function rescueTokens(</span></span>
<span id="L786"><span class="lineNum">     786</span>                 :             :     address token,</span>
<span id="L787"><span class="lineNum">     787</span>                 :             :     address to,</span>
<span id="L788"><span class="lineNum">     788</span>                 :             :     uint256 amount</span>
<span id="L789"><span class="lineNum">     789</span>                 :             :   ) external virtual override onlyPoolAdmin {</span>
<span id="L790"><span class="lineNum">     790</span>                 :<span class="tlaGNC">        4000 :     PoolLogic.executeRescueTokens(token, to, amount);</span></span>
<span id="L791"><span class="lineNum">     791</span>                 :             :   }</span>
<span id="L792"><span class="lineNum">     792</span>                 :             : </span>
<span id="L793"><span class="lineNum">     793</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L794"><span class="lineNum">     794</span>                 :             :   /// @dev Deprecated: maintained for compatibility purposes</span>
<span id="L795"><span class="lineNum">     795</span>                 :<span class="tlaGNC">          17 :   function deposit(</span></span>
<span id="L796"><span class="lineNum">     796</span>                 :             :     address asset,</span>
<span id="L797"><span class="lineNum">     797</span>                 :             :     uint256 amount,</span>
<span id="L798"><span class="lineNum">     798</span>                 :             :     address onBehalfOf,</span>
<span id="L799"><span class="lineNum">     799</span>                 :             :     uint16 referralCode</span>
<span id="L800"><span class="lineNum">     800</span>                 :             :   ) external virtual override {</span>
<span id="L801"><span class="lineNum">     801</span>                 :<span class="tlaGNC">          34 :     SupplyLogic.executeSupply(</span></span>
<span id="L802"><span class="lineNum">     802</span>                 :             :       _reserves,</span>
<span id="L803"><span class="lineNum">     803</span>                 :             :       _reservesList,</span>
<span id="L804"><span class="lineNum">     804</span>                 :             :       _usersConfig[onBehalfOf],</span>
<span id="L805"><span class="lineNum">     805</span>                 :             :       DataTypes.ExecuteSupplyParams({</span>
<span id="L806"><span class="lineNum">     806</span>                 :             :         asset: asset,</span>
<span id="L807"><span class="lineNum">     807</span>                 :             :         amount: amount,</span>
<span id="L808"><span class="lineNum">     808</span>                 :             :         onBehalfOf: onBehalfOf,</span>
<span id="L809"><span class="lineNum">     809</span>                 :             :         referralCode: referralCode</span>
<span id="L810"><span class="lineNum">     810</span>                 :             :       })</span>
<span id="L811"><span class="lineNum">     811</span>                 :             :     );</span>
<span id="L812"><span class="lineNum">     812</span>                 :             :   }</span>
<span id="L813"><span class="lineNum">     813</span>                 :             : </span>
<span id="L814"><span class="lineNum">     814</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L815"><span class="lineNum">     815</span>                 :<span class="tlaGNC">           2 :   function getFlashLoanLogic() external pure returns (address) {</span></span>
<span id="L816"><span class="lineNum">     816</span>                 :<span class="tlaGNC">           6 :     return address(FlashLoanLogic);</span></span>
<span id="L817"><span class="lineNum">     817</span>                 :             :   }</span>
<span id="L818"><span class="lineNum">     818</span>                 :             : </span>
<span id="L819"><span class="lineNum">     819</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L820"><span class="lineNum">     820</span>                 :<span class="tlaGNC">           2 :   function getBorrowLogic() external pure returns (address) {</span></span>
<span id="L821"><span class="lineNum">     821</span>                 :<span class="tlaGNC">           6 :     return address(BorrowLogic);</span></span>
<span id="L822"><span class="lineNum">     822</span>                 :             :   }</span>
<span id="L823"><span class="lineNum">     823</span>                 :             : </span>
<span id="L824"><span class="lineNum">     824</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L825"><span class="lineNum">     825</span>                 :<span class="tlaGNC">           2 :   function getBridgeLogic() external pure returns (address) {</span></span>
<span id="L826"><span class="lineNum">     826</span>                 :<span class="tlaGNC">           6 :     return address(BridgeLogic);</span></span>
<span id="L827"><span class="lineNum">     827</span>                 :             :   }</span>
<span id="L828"><span class="lineNum">     828</span>                 :             : </span>
<span id="L829"><span class="lineNum">     829</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L830"><span class="lineNum">     830</span>                 :<span class="tlaGNC">           2 :   function getEModeLogic() external pure returns (address) {</span></span>
<span id="L831"><span class="lineNum">     831</span>                 :<span class="tlaGNC">           6 :     return address(EModeLogic);</span></span>
<span id="L832"><span class="lineNum">     832</span>                 :             :   }</span>
<span id="L833"><span class="lineNum">     833</span>                 :             : </span>
<span id="L834"><span class="lineNum">     834</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L835"><span class="lineNum">     835</span>                 :<span class="tlaGNC">           2 :   function getLiquidationLogic() external pure returns (address) {</span></span>
<span id="L836"><span class="lineNum">     836</span>                 :<span class="tlaGNC">           6 :     return address(LiquidationLogic);</span></span>
<span id="L837"><span class="lineNum">     837</span>                 :             :   }</span>
<span id="L838"><span class="lineNum">     838</span>                 :             : </span>
<span id="L839"><span class="lineNum">     839</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L840"><span class="lineNum">     840</span>                 :<span class="tlaGNC">           2 :   function getPoolLogic() external pure returns (address) {</span></span>
<span id="L841"><span class="lineNum">     841</span>                 :<span class="tlaGNC">           6 :     return address(PoolLogic);</span></span>
<span id="L842"><span class="lineNum">     842</span>                 :             :   }</span>
<span id="L843"><span class="lineNum">     843</span>                 :             : </span>
<span id="L844"><span class="lineNum">     844</span>                 :             :   /// @inheritdoc IPool</span>
<span id="L845"><span class="lineNum">     845</span>                 :<span class="tlaGNC">           2 :   function getSupplyLogic() external pure returns (address) {</span></span>
<span id="L846"><span class="lineNum">     846</span>                 :<span class="tlaGNC">           6 :     return address(SupplyLogic);</span></span>
<span id="L847"><span class="lineNum">     847</span>                 :             :   }</span>
<span id="L848"><span class="lineNum">     848</span>                 :             : }</span>
        </pre>
              </td>
            </tr>
          </table>
          <br>

          <table width="100%" border=0 cellspacing=0 cellpadding=0>
            <tr><td class="ruler"><img src="../../../../../../../../../glass.png" width=3 height=3 alt=""></td></tr>
            <tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr>
          </table>
          <br>

</body>
</html>
